package cn.tedu.demo.test;

import cn.tedu.demo.Demo;
import cn.tedu.demo.controller.Config;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;


public class Demo01 {
    public static void main(String[] args) {
       AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class);
       //从Spring中获取,Spring控制管理的Bean对象
     Demo demo=   ctx.getBean("bean", Demo.class);
        System.out.println(demo);
    }
}
